﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace LotteCinema
{
    public partial class RapChieuTheoPhim : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string kq = "";
            DataTable rapphim = CProvider.Docbang("exec ViewRapTheoPhim '" + Request["maphim"].ToString() + "'");
            Session["maphim"] = Request["maphim"].ToString();
            if (rapphim.Rows.Count > 0)
            {
                for (int i = 0; i < rapphim.Rows.Count; i++)
                {
                    kq += "<a style=\"display: block;\" class=\"item\" onclick=\"showLichChieuPhim('" + Request["maphim"].ToString() + "', '" + rapphim.Rows[i][0].ToString() + "')\">" + rapphim.Rows[i][1].ToString() + "</a>";
                    Session["tenphim"] = CProvider.LayDuLieu("select tenphim from phim where maphim='" + Request.QueryString["maphim"].ToString() + "'");
                    Session["marap"] = rapphim.Rows[i][0];
                    Session["tenrap"] = rapphim.Rows[i][1];
                }
            }
            Response.Write(kq);
        }
    }
}